import request from '@/utils/request'
export default{
  //获取所有管理员
  getallmanager(){
    return request({
      url: `/eduservice/user/getallusers`,
      method: 'get'
    })
  },
  //带条件的用户分页查询
  getuserpagesx(userquery){
    return request({
      url: `/eduservice/user/queryuserpages`,
      method: 'post',
      data: userquery
    })
  },
  //注册用户
  adduserx(users){
    return request({
      url: `/eduservice/user/adduser`,
      method: 'post',
      data: users
    })
  },
  //得到用户总数
  getusertotal(){
    return request({
      url: `/eduservice/user/sumofusers`,
      method: 'get'
    })
  },
  getusertotalcx(userquery){
    return request({
      url: `/eduservice/user/sumofuserscx`,
      method: 'post',
      data: userquery
    })
  },
  //根据用户id获取角色信息
  getrolebyuid(id){
    return request({
      url: `/eduservice/user/getuserrolebyid/${id}`,
      method: 'get',
    })
  },
  //获取所有角色
  getallrolename(){
    return request({
      url: `/eduservice/user/getallrolename`,
      method: 'get',
    })
  },
  //给用户分配角色
  adduserrolesx(adduserrole){
    return request({
      url: `/eduservice/user/updateuserroles`,
      method: 'post',
      data: adduserrole
    })
  },
  //逻辑删除用户
  logicdeleteus(id){
    return request({
      url: `/eduservice/user/logicdeleteuserbyid/${id}`,
      method: 'get',
    })
  },
  /////////////////////////////////////////// 角色页面
  getrolepagedata(rolequery){
    return request({
      url: `/eduservice/user/queryrolesPages`,
      method: 'post',
      data: rolequery
    })
  },
  //有条件的角色总数
  getrolecountc(rolequery){
    return request({
      url: `/eduservice/user/getrolesnumc`,
      method: 'post',
      data: rolequery
    })
  },
  //无条件的角色参数
  getrolecount(){
    return request({
      url: `/eduservice/user/getrolesnum`,
      method: 'get',
    })
  },
  //根据角色id获取菜单信息
  getmenusbyroleid(id){
    return request({
      url: `/eduservice/user/getmenusbyroleid/${id}`,
      method: 'get',
    })
  },
  //根据角色id获取用户信息
  getmenusbyroleidc(id){
    return request({
      url: `/eduservice/user/getmenusbyroleidc/${id}`,
      method: 'get',
    })
  },
  //获取菜单List
  getmenulistc(){
    return request({
      url: `/eduservice/user/getmenulist`,
      method: 'get',
    })
  },
  //获取用户List
  getuserlistc(){
    return request({
      url: `/eduservice/user/getuserlist`,
      method: 'get',
    })
  },
  //给角色分配菜单
  addmenutorole(menuname,roleid){
    return request({
      url: `/eduservice/user/addrolemenu/${menuname}/${roleid}`,
      method: 'get',
    })
  },
  //给角色分配用户
  addmenutorolec(username,roleid){
    return request({
      url: `/eduservice/user/addroleuser/${username}/${roleid}`,
      method: 'get',
    })
  },
  //删除角色与菜单的关系
  delerm(id){
    return request({
      url: `/eduservice/user/deleteindexofrm/${id}`,
      method: 'get',
    })
  },
  //删除角色与用户的关系
  deleru(id){
    return request({
      url: `/eduservice/user/deleteindexofru/${id}`,
      method: 'get',
    })
  },
  //逻辑删除角色
  logicdeleterole(id){
    return request({
      url: `/eduservice/user/logicdeleterolebyid/${id}`,
      method: 'get',
    })
  },
  //新增角色
  addrolex(name,label){
    return request({
      url: `/eduservice/user/addnewrole/${name}/${label}`,
      method: 'get',
    })
  },
  //带条件的菜单分页查询
  getpermissions(permissionquery){
    return request({
      url: `/eduservice/user/querymenusPages`,
      method: 'post',
      data: permissionquery
    })
  },
  //不带条件获取菜单个数
  getmenusx(){
    return request({
      url: `/eduservice/user/getcountofmenus`,
      method: 'get',
    })
  },
  //带条件获取菜单个数
  getmenusxc(permissionquery){
    return request({
      url: `/eduservice/user/getcountofmenusc`,
      method: 'post',
      data: permissionquery
    })
  },
  //新增菜单
  addnmenu(permissionadd){
    return request({
      url: `/eduservice/user/addpermission`,
      method: 'post',
      data: permissionadd
    })
  },
  //新增菜单
  updatenmenu(permissionadd){
    return request({
      url: `/eduservice/user/updatepermission`,
      method: 'post',
      data: permissionadd
    })
  },
  //逻辑删除菜单
  logicdeletepermission(id){
    return request({
      url: `/eduservice/user/logicdelemenubyid/${id}`,
      method: 'get',
    })
  },
  //用户登录获取权限
  userlogin(users){
    return request({
      url: `/eduservice/user/getadmin`,
      method: 'post',
      data: users
    })
  },
  ////用户日志 提交
  submitusrlog(userlog){
    return request({
      url: `/eduservice/user/uploaduserlog`,
      method: 'post',
      data: userlog
    })
  },
  //用户日志查询
  //个数无条件
  getuserlognum(){
    return request({
      url: `/eduservice/user/getusrlognumnoquery`,
      method: 'get',
    })
  },
  //分页查询
  getuserlogsbyquery(userlogquery){
    return request({
      url: `/eduservice/user/queryuserlog`,
      method: 'post',
      data: userlogquery
    })
  },
  //个数有条件
  getuserlonnumc(userlogquery){
    return request({
      url: `/eduservice/user/getusrlognumhasquery`,
      method: 'post',
      data: userlogquery
    })
  },
  //退出登录
  logoutservice(){
    return request({
      url: `/eduservice/user/logout`,
      method: 'get',
    })
  },
  //无权限获取角色roles
  noqxgetrole(){
    return request({
      url: `/eduservice/user/noquanxiangetroles`,
      method: 'get',
    })
  },
  //根据用户id 获取当前权限
  getcurrentrlbyid(userid){
    return request({
      url: `/eduservice/user/getcurrentrole/${userid}`,
      method: 'get',
    })
  },
  //提交审核
  submitsh(qxshenhe){
    return request({
      url: `/eduservice/user/uploadshenhe`,
      method: 'post',
      data: qxshenhe
    })
  },
  //获取审核消息
  getshed(userid){
    return request({
      url: `/eduservice/user/getshenheinfo/${userid}`,
      method: 'get',
    })
  },
  //审核、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
  //带条件的审核信息分页查询
  getshps(shenhequery){
    return request({
      url: `/eduservice/user/getshenhebypage`,
      method: 'post',
      data: shenhequery
    })
  },
  //带条件查询审核的个数
  getshenhnumquery(shenhequery){
    return request({
      url: `/eduservice/user/getshenhenumbyquery`,
      method: 'post',
      data: shenhequery
    })
  },
  //不带条件查询审核个数
  getshenhnum(){
    return request({
      url: `/eduservice/user/getshenhenoquery`,
      method: 'get',
    })
  },
  //同意
  tongyish(qxshenhe){
    return request({
      url: `/eduservice/user/shenhetongyi`,
      method: 'post',
      data: qxshenhe
    })
  },
  //不同意
  butongyi(qxshenhe){
    return request({
      url: `/eduservice/user/shenhetongyino`,
      method: 'post',
      data: qxshenhe
    })
  }



}
